#pragma once
#include "EnemyUnit.h"
#include "../SGD Wrappers/SGD_Listener.h"

class BaseBehavior; 

class Guard :public EnemyUnit, public SGD::Listener
{
protected:

	BaseBehavior* currBehavior = nullptr;
	BaseObject* m_pHome = nullptr;
	SGD::Point m_ptLastKnownPos = { 0, 0 };
	SGD::HAudio* alertSound = nullptr;
	bool isAlive = true;

public:
	Guard();
	~Guard();

	virtual void Update(float dt)	 override;
	
	virtual void HandleEvent(const SGD::Event* pEvent);
	virtual void HandleCollision(const IBase* pOther) override;

	virtual int GetType(void) const override { return OBJ_GUARD; }
	virtual void Attack() override;


	friend class BaseBehavior;

	void RetrieveBehavior(std::string name);

};

